package jvm.t1;

/**
 * Remarks:
 * Class name :Demo23
 * Date :2023/2/9 10:12
 * Author:杨俊源
 */
public class Demo23 {
    public static void main(String[] args) {

        String x = "ab";
        String s = new String("a") + new String("b");

        String s2 = s.intern();

        System.out.println("s2 = " + s2);

        System.out.println(s2 == x);
        System.out.println(s == x);
    }
}
